#pragma once
#include "CBaseManager.h"
#include "WareEngineNameSpace.h"

BEGIN_WARE

class ISpriteAnimation;
class ISpriteAnimationRes;
class IResourceManager;

class CAnimationManager : public CBaseResManager
{
public:
	CAnimationManager(void) {}
	~CAnimationManager(void) {}

	int32			CreateAnimation( const VCHAR* szAniName, ISpriteAnimationRes** ppAnimation, int32 nPriority = 0, int32 nRecycleLevel = 0xffffffff );
	void			ReleaseAnimation( ISpriteAnimationRes* pAnimation );
	VBOOL			SaveAnimation( const VCHAR* szFileName, ISpriteAnimation* pAnimation );

	int32			ApplyAnimation( ISpriteAnimationRes* pAnimation );

protected:
	virtual void	DestroyRes( IResource* pResouce );	
};

END_WARE
